package com.hc.wdj.core.error;

/**
 * @author ryanwdj
 * @since 2024/11/16
 */

public enum CoreError implements HcError{

    /**
     * 自定义异常
     */
    CUSTOMER_ERROR(-2, "%s"),

    UNDEFINED(-1, "内部异常"),
    PARAM_ERROR(10000, "参数有误。%s"),
    CANNOT_FETCH_VALID_CONTEXT(10001,"未能获取有效的上下文处理器"),
    ;

    private final int code;
    private final String message;

    CoreError(int code, String message){
        this.code = code;
        this.message = message;
    }

    public int getCode(){
        return this.code;
    }

    public String getMessage(){
        return this.message;
    }
}
